/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author Ekaterina
 */

@Entity
@Table (name = "pasport", catalog = "otdelkadrov", schema = "")
public class Pasport implements Serializable {
  
@Column(name = "seria")
private String seria;

@Column(name = "number")
private int number;

@Column(name = "by_whom")
private String by_whom;

@Column(name = "date_when")
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date date_when;

@Id
@GeneratedValue
@Column (name="id")
private Integer id = null;

@OneToOne
@JoinColumn(name = "worker",referencedColumnName = "id")
private Worker worker;

    public String getSeria() {
        return seria;
    }

    public int getNumber() {
        return number;
    }

    public String getBy_whom() {
        return by_whom;
    }

    public Date getDate_when() {
        return date_when;
    }

    public Integer getId() {
        return id;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setSeria(String seria) {
        this.seria = seria;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public void setBy_whom(String by_whom) {
        this.by_whom = by_whom;
    }

    public void setDate_when(Date date_when) {
        this.date_when = date_when;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }


    
}
